import 'package:json_annotation/json_annotation.dart';
import 'package:lovify/models/enums/gender.dart';
import 'package:lovify/models/enums/relationship_status.dart';
import 'base_entity.dart';

part 'user.g.dart';

@JsonSerializable(explicitToJson: true)
class User extends BaseEntity {
   String? deviceId;
   String? name;
   DateTime? birthday;
   Gender? gender;
   String? avatar;
   RelationshipStatus? relationshipStatus;
   bool? isOnline;
   String? roleId;
   double? latitude;
   double? longitude;

  User({
    super.id,
    super.created,
    super.updated,
    super.deleted,
    this.deviceId,
    this.name,
    this.birthday,
    this.gender,
    this.avatar,
    this.relationshipStatus,
    this.isOnline,
    this.roleId,
    this.latitude,
    this.longitude,
  });

  factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);

  @override
  Map<String, dynamic> toJson() => _$UserToJson(this);
}
